import 'package:flutter/cupertino.dart';

Offset change(Offset point, Offset topPoint, double indexWidth, double padding,
    int i, double maxY,   List<double> data) {
  double x = point.dx + indexWidth * i  - padding;
  double y = point.dy -
      (point.dy - topPoint.dy) * ((data[i - 1]) / maxY);
  return Offset(x, y);
}

Offset changeRec(Offset point, Offset topPoint, double indexWidth, double padding,
    int i, double maxY, List<double> data) {
  double x = point.dx + indexWidth * i - padding - padding;
  double y = point.dy - (point.dy - topPoint.dy) * ((data[i - 1]) / maxY);
  return Offset(x, y);
}
